<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>缴费信息</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="<%=basepath%>css/index.css" rel="stylesheet" type="text/css">
    <link href="<%=basepath%>css/parking.css" rel="stylesheet" type="text/css">
    <script src="<%=basepath%>js/jquery-1.8.3.min.js"></script>
    <script src="<%=basepath%>js/layer/layer.js"></script>
</head>
<body>
<div class="viewport">
    <div class="header">
       <div class="header-1">
           <a href="javascrpt:void(0)" id="join" class="header-2">
              <span id="account" class="account">${empty user.realName ? '' : user.realName}</span>&nbsp;&nbsp;<span id="deptName" class="deptName">${user.departmentName}</span>
           </a>
           <a href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=yuexi&prefix=3g_mmzs&entrance=yes" class="back" id="back">返回</a>
           <span class="span-num">WOP23000</span>
       </div>
    </div>
    <form action="" method="post" id="queryFrm" name="queryFrm">
        <div class="content m-top">
            <div class="hr-1"></div>
            <div class="fix">
                <div class="fix-1">
                    <a href="/wape-web/api/core/centerService?serviceCode=MMZS120&queryType=1" class="fix-1-1">全部调度信息</a>
                    <a href="/wape-web/api/core/centerService?serviceCode=MMZS120&queryType=2" class="fix-1-1 li-active">缴费信息</a>
                    <a href="/wape-web/api/core/centerService?serviceCode=MMZS122&queryFlag=1" class="fix-1-1">24小时收费信息</a>
                    <a href="/wape-web/api/core/centerService?serviceCode=MMZS120&queryType=4" class="fix-1-1 margin-right">超时提醒</a>
                </div>
            </div>
            <div class="blank-m"></div>
            <div class="vehicle-2">
                <div class="vehicle-2-1">
                <span class="span-1" style="float:left;">
	                <select id="query" name="query" style="border:none;background-color: transparent;">
                        <c:if test="${queryFlag == null}">
                            <option value="0" selected="selected">-请选择查询条件-</option>
                        </c:if>
                        <c:if test="${queryFlag != null}">
                            <option value="0">-请选择查询条件-</option>
                        </c:if>
                        <c:if test="${queryFlag != null and queryFlag == '1'}">
                            <option value="1" selected="selected">仅显示当天</option>
                        </c:if>
                        <c:if test="${queryFlag == null or queryFlag != '1'}">
                            <option value="1">仅显示当天</option>
                        </c:if>
                        <c:if test="${queryFlag != null and queryFlag == '2'}">
                            <option value="2" selected="selected">仅显示已缴费的车辆</option>
                        </c:if>
                        <c:if test="${queryFlag == null or queryFlag != '2'}">
                            <option value="2">仅显示已缴费的车辆</option>
                        </c:if>
                        <c:if test="${queryFlag != null and queryFlag == '3'}">
                            <option value="3" selected="selected">仅显示未缴费的车辆</option>
                        </c:if>
                        <c:if test="${queryFlag == null or queryFlag != '3'}">
                            <option value="3">仅显示未缴费的车辆</option>
                        </c:if>
                    </select>
                </span>
                </div>
            </div>
            <c:forEach var="el" items="${list}">
                <c:set var="dt" value="${el.get('feeCount') }"></c:set>
                <div class="vehicle-3">
                    <div class="vehicle-3-1">
                        <table>
                            <tr>
                                <td style="float:left;">${dt.dateStr}</td>
                                <td><b>${dt.countCar}</b>台次</td>
                                <td style="text-align:right;">已收：<b>${dt.acceFee }</b>元</td>
                                <td style="float:right;">待收：<b>${dt.waitFee }</b>元</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <c:forEach var="pt" items="${el.get('list')}">
                    <div class="vehicle-4">
                        <a href="/wape-web/api/core/centerService?serviceCode=MMZS112&inRecordNum=${pt.inRecordNum }&storeId=${pt.storeId}&storeName=${pt.storeName}&sonStoreName=${pt.sonStoreName}&sonStoreId=${pt.sonStoreId}&payType=${pt.payType}&queryType=1" class="vehicle-4-1">
                            <table>
                                <tr>
                                    <td class="td-v1">${pt.plateNum}</td>
                                    <td class="td-v2">${pt.sonStoreName}</td>
                                    <td class="td-v3">${pt.payment}元</td>
                                    <c:if test="${pt.payType eq '0'}">
                                        <td class="red td-v4">未缴费</td>
                                    </c:if>
                                    <c:if test="${(pt.payType eq '1') and (pt.carDispatcherType == '40')}">
                                        <td class="gray td-v4 translucent">已离场</td>
                                    </c:if>
                                    <c:if test="${(pt.payType eq '1') and (pt.carDispatcherType != '40')}">
                                        <td class="gray td-v4">已缴费</td>
                                    </c:if>
                                    <c:if test="${(pt.payType eq '2')}">
                                        <td class="blue td-v4">已挪车位</td>
                                    </c:if>
                                </tr>
                            </table>
                        </a>
                    </div>
                </c:forEach>
                <div class="blank"></div>
            </c:forEach>
            <div class="space"></div>
        </div>
    </form>
</div>
<script type="text/javascript">
    /*错误提示*/
    $(function(){
        var error = "${requestScope.returnMsg}";
        if(error != "" && error != "成功!"){
            layer.msg(error,{shadeClose:true,shade:0.1,time:2000});
        }
    });
    /*  */
    function doQuery(flag) {
        var frm = document.forms['queryFrm'];
        var url = '/wape-web/api/core/centerService?serviceCode=MMZS120&queryType=2';
        if(flag != '0') {
            url += '&queryFlag=' + flag;
        }
        frm.action = url;
        frm.submit();
    }
    $(function(){
        $('#query').change(function(){
            var selectedVal = $("#query").find("option:selected").val();
            doQuery(selectedVal);
        });
    });
</script>
</body>
</html>

